<div class="crumb-wrap">
    <div class="crumb-list"> <i class="icon-font"></i>
        <a href="<?=site_url()?>">首页</a>
        <span class="crumb-step">&gt;</span>
        <a class="crumb-name" href="<?=site_url('sort/index')?>">分类管理</a>
        <span class="crumb-step">&gt;</span>
        <span>新增分类</span>
    </div>
</div>
<div class="result-wrap">
    <div class="result-content">
        <form action="<?=site_url('sort/create')?>" method="post" id="myform" name="myform" enctype="multipart/form-data">
            <table class="insert-tab" width="100%">
                <tbody>
                    <tr>
                        <th width="120">
                            <i class="require-red">*</i>
                            分类名称：
                        </th>
                        <td>
                            <input class="common-text required" id="title" name="title" size="50" value="" type="text"></td>
                    </tr>
                    <tr>
                        <th>描述：</th>
                        <td>
                            <textarea name="content" class="common-textarea" id="described" cols="20" style="width: 98%;" rows="5"></textarea>
                        </td>
                    </tr>
                    <tr>
                        <th></th>
                        <td>
                            <input class="btn btn-primary btn6 mr10" value="提交" type="submit">
                            <input class="btn btn6" onclick="history.go(-1)" value="返回" type="button"></td>
                    </tr>
                </tbody>
            </table>
        </form>
    </div>
</div>

<script type="text/javascript">
    $('#myform').submit(function() {
        var index = layer.load(2);
        $(this).ajaxSubmit(function(data){
            layer.close(index);
            if(data > 0){
                layer.alert("操作成功！",{
                    icon:1,
                },function(){
                    location.href='<?=site_url("sort/index")?>';
                });
            }else{
                layer.alert(data,{
                    icon:2,
                });
            }
        })
        return false;
    })
</script>